﻿@model PresentationMVC.Models.InvoiceDataModel
@{
    
    var grid = new WebGrid(Model.JobBookingByInvoiceId,
                                           defaultSort: "ID",
                                           rowsPerPage: 7, fieldNamePrefix: "",
                                           canPage: true, canSort: true,
                                           pageFieldName: "page", sortFieldName: "srt"
                                           );

}
<table cellpadding="0" cellspacing="0" width="100%">
    <tr>
        <td>
            @grid.Table(tableStyle: "listing-border", headerStyle: "gridhead", footerStyle: "paging", rowStyle: "td-dark", alternatingRowStyle: "td-light",
                                columns:
                                    grid.Columns(
                                                     //grid.Column("Customer.Name", "Customer", style: "colCustomer"),
                                                     grid.Column("FromAddressLine1", "From Address", style: "colFromAddress"),
                                                     grid.Column("ToAddressLine1", "To Address", style: "colToAddress"),
                                                     grid.Column("JobDateTime", "Job Date Time", style: "colJobDateTime")
                                                     //grid.Column("PassengerDetails.PassengerName", "Passenger Name", style: "colPassengerName"),
                                                     //grid.Column("Staff.Name", "Staff Name", style: "colStaff")
                                                 ))
        </td>
    </tr>
</table>
@LocalHelpers.DoAjaxPager(Ajax,new AjaxOptions
{
    UpdateTargetId = "DivInvoiceJobGrid",
    InsertionMode = InsertionMode.Replace,
    LoadingElementId = "invoiceJobResultLoadingDiv"
}, Html, "ReloadInvoiceJobGrid", grid, 10, new { CurrentFilter = ViewBag.CurrentFilter })

